package com.yuncheng.oaApi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.yuncheng.entity.YcSysUser;
import com.yuncheng.entity.YcSysUserDepart;
import com.yuncheng.entity.YcSysUserRole;

import com.yuncheng.vo.GetKsKz;


import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OaYcSysUserMapper extends BaseMapper<YcSysUser> {
    void addYcSysUserDept(YcSysUserDepart ycSysUserDepart);

    void addYcSysUserRole(YcSysUserRole ycSysUserRole);

    List<YcSysUserRole> getYcUserRole(YcSysUserRole ycSysUserRole);

    List<GetKsKz> getKsKzObject(@Param("deptName") String deptName, @Param("zw") String zw);

    List<GetKsKz> getKsKzObjectzbm(@Param("deptName") String deptName, @Param("zw") String zw);


    Page<YcSysUser> getZxzy(Page<YcSysUser> page,String zxzyid);

    Page<YcSysUser> getZxzys(Page<YcSysUser> page,String zxzyid,String realname);

    /**
     * 通过岗位id 获取用户姓名 id
     * @param sysjobid
     * @return
     */
    List<YcSysUser> getGwDbr(String sysjobid);

    /**
     * 通过角色id 获取中心职员姓名id
     * @param zxzyid
     * @return
     */
    List<YcSysUser> getZxzy(String zxzyid);

    /**
     * 通过组织id 获取用户姓名id
     * @param sysorgid
     * @return
     */
    List<YcSysUser>  getUserByDepartId(String sysorgid);

    /**
     * 获取用户主部门id
     * @param userid
     * @return
     */
    List<String> getUserZbmByUserId(String userid);


    /**
     * 获取当前部门下的所有人员列表
     */
    List<YcSysUser> getDeptIndexUserList(@Param("sysorgid") String sysorgid);


    /**
     * 查询用户姓名列表-根据ids
     * @param ids
     * @return
     */
    List<YcSysUser> findRealnameListByIds(@Param("ids") List<String> ids);


    String findRealnameById(@Param("id") String id);

}
